<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    if (env('IS_DEMO') == true) {
        $router->get('auth/menu', 'HomeController@index');
    }
    $router->get('/', 'HomeController@index');
    $router->any('/ws/bind', 'WssController@bind');
    $router->any('/ws/sendMsg', 'WssController@sendMsg');
    $router->resource('/cate', CategoryController::class);
    $router->resource('/sms', SmsController::class);
    $router->resource('/goods', GoodsController::class);
    $router->resource('/wx_pay', WxPayController::class);
    $router->resource('/version', VersionController::class);
    $router->resource('/wss', WssController::class);
    $router->resource('/mp_wx_config', MpWxConfigController::class);
    
});
